package org.raymond.iworks.study.basic.designpattern.flyweight;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Client {
    public static void main(String[] args) {
        // 外部状态
        User user = new User();
        user.setName("diablo");
        WebSiteFactory factory = new WebSiteFactory();
        WebSite webSite1 = factory.getWebSite("news");
        webSite1.use(user);

        WebSite webSite2 = factory.getWebSite("blog");
        webSite2.use(user);
    }
}
